<?php if (! defined('APPPATH')) die('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| DATABASE MAP
|--------------------------------------------------------------------------
|	
| Database table relationships for each Model.
|
| Definition between two tables:
|
| $dbmap[table_1][relationship][table_2][join][table_1.field][table_2.field] = 'bind_property';
|
|
| Definition between three tables (many to many):
|
| $dbmap[table_1]['has_many'][table_2] ['throw'][table_3] [join][table_1.field][table_3.field] = 'bind_property';
| $dbmap[table_2]['has_many'][table_1] ['throw'][table_3] [join][table_2.field][table_3.field] = 'bind_property';
|
| Relationships: 'has_one' or 'has_many'
| Joins: 'join' or 'left join' or 'right join' or 'inner join'
|
*/

/* 
| RENARTI example 
| --- start
*/
$dbmap['User']['has_one']['Role']['join']['role_id']['id'] = 'Role';

$dbmap['Role']['has_many']['Permission']['throw']['RoleHasPermission']['join']['id']['role_id'] = 'Permissions';
$dbmap['Permission']['has_many']['Role']['throw']['RoleHasPermission']['join']['id']['permission_id'] = 'Roles';
/* 
| --- end
| RENARTI example 
*/


/*
| -------------------------------------------------------------------
|  IMPORTANT !!!
| -------------------------------------------------------------------
| Defined array <$dbmap> must be returned !!!
|
| Don`t forget add this code into your own any config files !!!
| Don`t delete next code row!!!
|
*/
return $dbmap;

/* End of file dbmap.php */
/* Location: ./application/config/dbmap.php */
